#include "ocl_video.h"	

const int BITS_PER_PIXEL = 24;
#include "../fonts/font5.h"

int OCL_VIDEO_Init(VIDEO_Ptr* out_ptr, int screen_w, int screen_h)
{
	out_ptr->SCREEN_WIDTH = screen_w;
	out_ptr->SCREEN_HEIGHT = screen_h;
	return 0;
}

int OCL_VIDEO_RenderText(const VIDEO_Ptr* in_ptr, char* Text, int size, int x, int y, unsigned short fg_color, unsigned short bg_color)
{

   GRRLIB_Print(x,y + font5_char_high*2,font5_char_width,font5_char_high,Text,font5, fg_color,bg_color);

   //printf("%c[%d;%df",0x1B,y,x);
   //printf("%s",Text);

   return 0;

}

int OCL_VIDEO_RenderImage(const VIDEO_Ptr* in_ptr, const u16 *img, const int img_w, const int img_h, int screen_x, int screen_y)
{
	if(img != NULL && in_ptr != NULL)
	{
		GRRLIB_DrawImg(screen_x, screen_y, //x and y coordinate to draw the image
					   img_w, img_h, //widht and hight of the image
					   img);	//the actual image data convertet with moulinette\gfx_convertor.php
	}

	return 0;		
}

void OCL_VIDEO_EndFrame(const VIDEO_Ptr* in_ptr)
{

}

void OCL_VIDEO_Destruct(VIDEO_Ptr* in_ptr)
{	

}
